package com.example.controller;

import com.example.common.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;


import java.util.HashMap;
import java.util.Map;
@CrossOrigin
@Api(tags = "后台登录管理")
@RestController
@RequestMapping("/admin/system/index")
public class IndexController {
    @ApiOperation("登录接口")
    @PostMapping("/login")
    public Result login(){

        return Result.ok().data("token","admin");

    }

    @GetMapping("info")
    public Result info() {
        return Result.ok().data("roles","admin").data("name","admin").data("avatar","http://www.weixintouxiang.cn/weixin/20140607090832328.gif");


    }


}